
import './input.css';
import {useState } from 'react';
export default (prop:any) => {
	const [boxstyle,setTotal] =  useState('minputBox');
	const [isFous,setIsFous] =  useState(false);
	const {placeholder='请输入',name,type='text'}= prop
  return (
    <div className={boxstyle} onMouseMove={()=>{
		setTotal('minputBox minputBox2')
	}} onMouseOut={()=>{
		if(isFous){return}
		setTotal('minputBox')
	}}>
		<input name={name} type={type} placeholder={placeholder} onFocus={()=>{
			setTotal('minputBox minputBox2')
			setIsFous(true)
		}} onBlur={()=>{
			setTotal('minputBox')
			setIsFous(false)
		}} className="minput1" />
		{prop.children}
	</div>
  );
};

